// 引用网络请求中间件
import request from '../../utils/request.js';

const API_NAME = '/activity'
/* 动态点赞 */

export default {
	/* 点赞 */
	like(uactivityId) {
		return request({
			url: `${API_NAME}/activityLikeApi/like?uactivityId=${uactivityId}`,
			method: 'POST',
		})
	},
	/* 取消点赞 */
	noLike(uactivityId) {
		return request({
			url: `${API_NAME}/activityLikeApi/cancelLike?uactivityId=${uactivityId}`,
			method: 'PUT',
		})
	},
	/* 发布动态 */
	addTrends(data) {
		return request({
			url: `${API_NAME}/activityApi/add`,
			method: 'POST',
			data
		})
	},
	deleteTrends(id) {
		return request({
			url: `${API_NAME}/activityApi?activityId=${id}`,
			method: 'DELETE',
		})
	},


	/* fy 朋友圈列表动态 */
	getFriendCircleActivity() {
		return request({
			url: `${API_NAME}/activityApi/list/page/friend`,
			method: 'GET',
		})
	},
	/* fy 自己动态列表 */
	getMyActivity() {
		return request({
			url: `${API_NAME}/activityApi/list/page/user`,
			method: 'GET',
		})
	},
	/* id 自己动态列表 */
	getMyActivityByid() {
		return request({
			url: `${API_NAME}/activityApi/list/page/userId?userId=111`,
			method: 'GET',
		})
	},
	/* fy 推荐动态列表 */
	recommendActivity() {
		return request({
			url: `${API_NAME}/activityApi/recommend/page`,
			method: 'GET',
		})
	}

}
